# $Date: 2009-10-14 08:24:37 -0300 (Wed, 14 Oct 2009) $
# $Revision: 1064 $

TARGET=fusewrapper
CC=gcc
# -Wextra: no me deja comparar signed con unsigned y esto es bastante común con size_t y off_t
# -pedantic: no deja inicializar la estructura fuse_operations
CFLAGS+= -ansi -Werror -Wall -Wdeclaration-after-statement -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-declarations  -Wmissing-prototypes -Wno-unused-parameter -g `pkg-config --cflags fuse` `pkg-config --cflags glib-2.0`
LDFLAGS=`pkg-config --libs fuse` `pkg-config --libs glib-2.0`

SOURCES=$(shell echo *.c)
OBJECTS=$(SOURCES:.c=.o)
BSTRING_OBJECTS=bstring/bstrlib.o

all: $(TARGET)

$(TARGET): $(OBJECTS) 
	$(CC) $^ -o $@ $(LDFLAGS)

clean:
	rm -f $(TARGET) $(OBJECTS) $(BSTRING_OBJECTS) .depend *~
	
.depend: *.[ch]
	$(CC) -MM `pkg-config fuse --cflags` `pkg-config --cflags glib-2.0` $(SOURCES) >.depend

-include .depend

.PHONY: clean all
